<template>
  <!-- <dv-full-screen-container> -->
  <div class="screen-container">
    <div class="screen-content" ref="screenRef">
      <div v-if="loading" class="mask flex-c">
        <dv-loading>
          <span class="loading-title">加载中...</span>
        </dv-loading>
      </div>
      <div class="header-section">
        <ScreenHeader />
      </div>
      <div class="screen-chart-section1">
        <!-- <dv-border-box-8 :dur="8">
            <ScreenTopLeft1 />
          </dv-border-box-8>
          <dv-border-box-8 :dur="12" :reverse="true">
            <ScreenTopRight1 />
          </dv-border-box-8>
          <dv-border-box-8 :dur="10">
            <ScreenTopRight2 />
          </dv-border-box-8>
          <dv-border-box-8 :dur="16" :reverse="true">
            <ScreenTopCenter />
          </dv-border-box-8> -->

        <dv-border-box-11 title="本月上传情况">
          <ScreenTopLeft1 />
        </dv-border-box-11>
        <dv-border-box-8 :dur="12" :reverse="true">
          <ScreenTopRight1 />
        </dv-border-box-8>
        <dv-border-box-8 :dur="10">
          <ScreenTopRight2 />
        </dv-border-box-8>
        <dv-border-box-8 :dur="16" :reverse="true">
          <ScreenTopCenter />
        </dv-border-box-8>
      </div>
      <div class="screen-chart-section2">
        <!-- <dv-border-box-8 :dur="50">
            <ScreenBottomLeft />
          </dv-border-box-8>
          <dv-border-box-8 :dur="50">
            <ScreenBottomRight />
          </dv-border-box-8> -->
        <dv-border-box-11 title="本年违章查处报表">
          <ScreenBottomLeft />
        </dv-border-box-11>
        <dv-border-box-11 title="违章视频">
          <ScreenBottomRight />
        </dv-border-box-11>
      </div>
      <!-- <div class="footer-section">
            <ScreenFooter />
          </div> -->
    </div>
  </div>
  <!-- </dv-full-screen-container> -->
</template>

<script setup lang="ts">
import windowResize from '@/utils/resize'
import { onMounted, onUnmounted, ref } from 'vue'
import ScreenHeader from './components/screen-header/ScreenHeader.vue'
import ScreenFooter from './components/screen-footer/ScreenFooter.vue'
import ScreenTopLeft1 from './components/screen-top-left1/ScreenTopLeft1.vue'
import ScreenTopLeft2 from './components/screen-top-left2/ScreenTopLeft2.vue'
import ScreenTopCenter from './components/screen-top-center/ScreenTopCenter.vue'
import ScreenTopRight1 from './components/screen-top-right1/ScreenTopRight1.vue'
import ScreenTopRight2 from './components/screen-top-right2/ScreenTopRight2.vue'
import ScreenBottomLeft from './components/screen-bottom-left/ScreenBottomLeft.vue'
import ScreenBottomRight from './components/screen-bottom-right/ScreenBottomRight.vue'

const { screenRef, calcRate, windowDraw, unWindowDraw } = windowResize()
const loading = ref(true)

onMounted(() => {
  // 监听浏览器窗口尺寸变化
  windowDraw()
  calcRate()
  setTimeout(() => {
    loading.value = false
  }, 2000)
})

onUnmounted(() => {
  unWindowDraw()
})
</script>

<style lang="scss">
@import '/src/assets/scss/common/variables.scss';
.flex-l {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}
.scr-up {
  color: #dc143c;
}

.scr-down {
  color: #90ee90;
}
// .react-l {
//   position: relative;
// }

// .react-l::before {
//   content: '';
//   position: absolute;
//   top: 0;
//   right: 0;
//   bottom: 0;
//   left: 0;
//   z-index: -1;
//   background: $theme-sub-color;
//   transform: skewX(45deg);
// }
.screen-container {
  width: 100vw;
  height: 100vh;
  background-color: $theme-color;
  display: flex;
  justify-content: center;
  align-items: center;

  .mask {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: $theme-color;
    z-index: 9999;
    background-image: url('@/assets/home_bg.png');
  }

  .screen-content {
    width: 1920px;
    // height: 100vh;
    // width: 90%;
    // height: 95%;
    box-sizing: border-box;
    padding: 12px;
    background-image: url('@/assets/home_bg.png');
    transition: all 0.2s ease-in-out;

    .loading-title {
      font-size: $base-font-size;
      color: #fff;
      margin-top: 10px;
    }

    .screen-chart-section1 {
      margin-top: 10px;
      display: grid;
      grid-template-columns: 2fr 1.5fr 2.5fr 1.5fr;
      grid-column-gap: 5px;
    }
    // 2fr  3fr

    .screen-chart-section2 {
      margin-top: 5px;
      display: grid;
      grid-template-columns: 5fr 5fr;
      grid-column-gap: 5px;
    }
  }
}
</style>
